<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">
    <title>学并思留言板</title>
    <link href="./tpl/css/bootstrap.min.css" rel="stylesheet">
    <link href="./tpl/css/main.css" rel="stylesheet">

    <link href="./tpl/css/bootstrap-theme.min.css" rel="stylesheet">

    <link href="theme.css" rel="stylesheet">
    <style type="text/css">
	.middle{
		width: 100%;
		height: 400px;
		margin-top: 100px;
	}
	.middle .login{
		width: 400px;
		height: 370px;
		margin-left: 100px;
		border: 1px solid #E6E6E6;
		position: relative;
    background: #F9F9F9 url() 0 0 no-repeat;
	}
	.middle .login .login_up{
		width: 300px;
		height: 60px;
		margin-left: 100px;
		margin: 0 auto;
		border-bottom: 1px dotted  #CABCBC;
	}
	.middle .login .login_up h4{
		font-size: 25px;
		text-align: center;
		line-height: 60px;
	}
	.middle .login span{
		display: block;
		text-align: center;
		width: 300px;
		height: 20px;
		margin-top: 50px;
		margin-left: 30px;
    margin-bottom: 20px;
	}
  .middle .login #lore{
    margin-left: 55px;
    display: block;
    width: 100px;
    height: 30px;
  }
	.middle .login .submit{
		width: 300px;
		height: 20px;
		display: inline;
		padding-left: 110px;
	}
    .middle .login .reset{
    width: 300px;
    height: 20px;
    display: inline;

  }
  #box{
    width: 65px;
    height: 26px;
    position: absolute;

  }
  .middle .login .yanzhen{
    width: 80px;
    height: 26px;
    position: absolute;
    right: 115px;
    bottom: 82px;
  }

    </style>
    <script type="text/javascript" src="./jquery-1.7.2.js">
    </script>
  </head>

  <body role="document">
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">留言板1.0</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="./index.php">留言板</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
          <?php if (isset($_SESSION['username'])) {
           ?>
            <li class="active"><a href="#"><?php echo $username ?>在线</a></li>
          <?php }else{ ?>
            <li class="active"><a href="#">登陆</a></li>
          <?php } ?>
            <li><a href="./regist.php">注册</a></li>
            <!-- <li><a href="./out.php">退出</a></li> -->
          </ul>
        </div>
      </div>
    </nav> 
    <div class="middle">
    	<div class="login">
    		<div class="login_up">
    			<h4>请登陆</h4>
    		</div>
          <form action="./login.php" method="post">
        		<span>用户名：<input type="text" value="" name="username"></span>

        		<span> 密&nbsp; &nbsp;码：<input type="password" value="" name="password"></span>
            <span id="lore">验证码：<input type="text" value="" id="box" name="yanzheng"></span>
        		<span class="submit"><input type="submit" value="登陆"></span>
            
            <span class="reset"><input type="reset" value="重置"></span>
          </form>
        <div class="yanzhen">
          <img src="./code.php" onClick="this.src='./code.php?nocache='+Math.random()" style="cursor:hand" alt=""/> 
        </div>
    
    	</div>
      &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<?php if(isset($error)){ echo $error;} ?>
    </div>